using System;
using System.ComponentModel.DataAnnotations;

namespace ThridGroup.ERP.DTO.RBAC
{
    public class PermissionDto
    {
        public Guid Id { get; set; }

        [Required(ErrorMessage = "权限名称不能为空")]
        [StringLength(50, ErrorMessage = "权限名称最大长度为50个字符")]
        public string Name { get; set; }

        [StringLength(200, ErrorMessage = "描述最大长度为200个字符")]
        public string Description { get; set; }

        [Required(ErrorMessage = "权限代码不能为空")]
        [StringLength(100, ErrorMessage = "权限代码最大长度为100个字符")]
        public string PermissionCode { get; set; }

        public bool IsActive { get; set; }

        public DateTime CreationTime { get; set; }

        public DateTime? LastModificationTime { get; set; }
    }

    public class CreateUpdatePermissionDto
    {
        [Required(ErrorMessage = "权限名称不能为空")]
        [StringLength(50, ErrorMessage = "权限名称最大长度为50个字符")]
        public string Name { get; set; }

        [StringLength(200, ErrorMessage = "描述最大长度为200个字符")]
        public string Description { get; set; }

        [Required(ErrorMessage = "权限代码不能为空")]
        [StringLength(100, ErrorMessage = "权限代码最大长度为100个字符")]
        public string PermissionCode { get; set; }

        public bool IsActive { get; set; } = true;
    }
} 